package cn.org.donald.pojo.dto.game;

import cn.org.donald.framework.annotation.IntegerLimit;
import cn.org.donald.framework.annotation.ListSize;
import cn.org.donald.framework.base.BaseModel;
import cn.org.donald.framework.validate.Insert;
import cn.org.donald.framework.validate.Update;
import cn.org.donald.pojo.entity.game.Feature;

import javax.validation.constraints.*;
import java.util.Date;
import java.util.List;

/**
 * @author : Donald
 * @since : 2020/12/12 15:41
 */
public class GameDto extends BaseModel {

    /**id*/
    @NotNull(message = "id不能为空", groups = Update.class)
    @Null(message = "id必须为空", groups = Insert.class)
    private Long id;

    /**游戏名称*/
    @NotBlank(message = "游戏名称不能为空",groups = Insert.class)
    private String gameName;

    /**游戏图片*/
    private String picture;

    /**类型id*/
    @NotNull(message = "类型id不能为空", groups = Insert.class)
    private Long typeId;

    /**游戏标题*/
    private String gameTitle;

    /**平台0:端游;1:手游*/
    @NotNull(message = "运行平台不能为空!",groups = Insert.class)
    @IntegerLimit(includes = {0,1},message = "只能输入0或1,0:端游;1:手游",groups = {Insert.class,Update.class})
    private Integer platform;

    /**是否在线默认0:单机; 1:网游*/
    @NotNull(message = "是否在线不能为空!",groups = Insert.class)
    @IntegerLimit(includes = {0,1},message = "只能输入0或1,0:单机; 1:网游",groups = {Insert.class,Update.class})
    private Integer online;

    /**游戏公司*/
    private String company;

    /**游戏描述*/
    private String description;

    /**更新日期*/
    private Date updateDate;

    /**游戏特性*/
    @ListSize(min = 1, message = "游戏特性至少添加一个",groups = Insert.class)
    private List<Feature> featureList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGameName() {
        return gameName;
    }

    public void setGameName(String gameName) {
        this.gameName = gameName;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    public String getGameTitle() {
        return gameTitle;
    }

    public void setGameTitle(String gameTitle) {
        this.gameTitle = gameTitle;
    }

    public Integer getPlatform() {
        return platform;
    }

    public void setPlatform(Integer platform) {
        this.platform = platform;
    }

    public Integer getOnline() {
        return online;
    }

    public void setOnline(Integer online) {
        this.online = online;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public List<Feature> getFeatureList() {
        return featureList;
    }

    public void setFeatureList(List<Feature> featureList) {
        this.featureList = featureList;
    }
}
